angular.module('starter.home.services', [])

.factory('ProductServices', [function() {
	var products = [
	    { id: 0, name: 'Scruff McGruff' },
	    { id: 1, name: 'G.I. Joe' },
	    { id: 2, name: 'Miss Frizzle' },
	    { id: 3, name: 'Ash Ketchum' }
  	];

  	return {
	    all: function() {
	      return products;
	    },
	    get: function(productId) {
	      // Simple index lookup
	      return products[productId];
	    }
  	};
}]);